/*
 * -------------------------------------------------------------------------------------------------------*
 * SBS Priceboard V2.0
 * Copyright (C) 2008 Unicom Vietnam JSC
 * -------------------------------------------------------------------------------------------------------* 
 * HeadURL: http://192.168.1.4/svn/priceboard/trunk/SBS_PriceboardV2/front-end/end-user/enduser_priceboard/
 * LastChangeBy:
 * LastChangeDate:
 */
package com.unicom.priceboard.data.vo;

import com.unicom.priceboard.util.HTML_Producer;

/**
 * Creation date: Sep 5, 2008
 * @author quan
 */
public class StockTrack {
	private String tradingDate;
	private String symbol;
	private int centerId;
	private int priorClosePrice;
	private int ceiling;
	private int floor;
	private int best1Bid;
	private int best2Bid;
	private int best3Bid;
	private int best1BidVolume;
	private int best2BidVolume;
	private int best3BidVolume;
	private int best1Offer;
	private int best2Offer;
	private int best3Offer;
	private int best1OfferVolume;
	private int best2OfferVolume;
	private int best3OfferVolume;
	private int averagePrice;
	private int vol;
	private int totalVol;
	private int highestPrice;
	private int lowestPrice;
	private int totalTradingValue;
	private double pct_change;
	
	public StockTrack(HaStock stock) {
		int unit = HTML_Producer.hastc_unit;
		this.tradingDate = stock.getTradingDate();
		this.symbol = stock.getSymbol();
		this.centerId = 2;
		this.priorClosePrice = new Double(stock.getPriorClosePrice()*unit).intValue();
		this.ceiling = new Double(stock.getCeiling()*unit).intValue();
		this.floor = new Double(stock.getFloor()*unit).intValue();
		this.averagePrice = new Double(stock.getPrice()*unit).intValue();/*Hack: closePrice will be AVG*/
		this.vol = stock.getVol();
		this.totalVol = stock.getTotalVol();
		this.totalTradingValue = new Double(stock.getTotalTradingValue()).intValue();
		
		if(this.priorClosePrice!=0)
			this.pct_change = stock.getPct_change();
		else
			this.pct_change = 0;
		
		this.best1Bid = new Double(stock.getBest1Bid()*unit).intValue();
		this.best2Bid = new Double(stock.getBest2Bid()*unit).intValue();
		this.best3Bid = new Double(stock.getBest3Bid()*unit).intValue();
		this.best1Offer = new Double(stock.getBest1Offer()*unit).intValue();
		this.best2Offer = new Double(stock.getBest2Offer()*unit).intValue();
		this.best3Offer = new Double(stock.getBest3Offer()*unit).intValue();
		this.best1BidVolume = stock.getBest1BidVolume();
		this.best2BidVolume = stock.getBest2BidVolume();
		this.best3BidVolume = stock.getBest3BidVolume();
		this.best1OfferVolume = stock.getBest1OfferVolume();
		this.best2OfferVolume = stock.getBest2OfferVolume();
		this.best3OfferVolume = stock.getBest3OfferVolume();
	}
	
	/**
	 * @return the tradingDate
	 */
	public String getTradingDate() {
		return tradingDate;
	}
	/**
	 * @return the symbol
	 */
	public String getSymbol() {
		return symbol;
	}
	/**
	 * @return the centerId
	 */
	public int getCenterId() {
		return centerId;
	}
	/**
	 * @return the priorClosePrice
	 */
	public int getPriorClosePrice() {
		return priorClosePrice;
	}
	/**
	 * @return the ceiling
	 */
	public int getCeiling() {
		return ceiling;
	}
	/**
	 * @return the floor
	 */
	public int getFloor() {
		return floor;
	}
	/**
	 * @return the best1Bid
	 */
	public int getBest1Bid() {
		return best1Bid;
	}
	/**
	 * @return the best2Bid
	 */
	public int getBest2Bid() {
		return best2Bid;
	}
	/**
	 * @return the best3Bid
	 */
	public int getBest3Bid() {
		return best3Bid;
	}
	/**
	 * @return the best1BidVolume
	 */
	public int getBest1BidVolume() {
		return best1BidVolume;
	}
	/**
	 * @return the best2BidVolume
	 */
	public int getBest2BidVolume() {
		return best2BidVolume;
	}
	/**
	 * @return the best3BidVolume
	 */
	public int getBest3BidVolume() {
		return best3BidVolume;
	}
	/**
	 * @return the best1Offer
	 */
	public int getBest1Offer() {
		return best1Offer;
	}
	/**
	 * @return the best2Offer
	 */
	public int getBest2Offer() {
		return best2Offer;
	}
	/**
	 * @return the best3Offer
	 */
	public int getBest3Offer() {
		return best3Offer;
	}
	/**
	 * @return the best1OfferVolume
	 */
	public int getBest1OfferVolume() {
		return best1OfferVolume;
	}
	/**
	 * @return the best2OfferVolume
	 */
	public int getBest2OfferVolume() {
		return best2OfferVolume;
	}
	/**
	 * @return the best3OfferVolume
	 */
	public int getBest3OfferVolume() {
		return best3OfferVolume;
	}
	/**
	 * @return the averagePrice
	 */
	public int getAveragePrice() {
		return averagePrice;
	}
	/**
	 * @return the vol
	 */
	public int getVol() {
		return vol;
	}
	/**
	 * @return the totalVol
	 */
	public int getTotalVol() {
		return totalVol;
	}
	/**
	 * @return the highestPrice
	 */
	public int getHighestPrice() {
		return highestPrice;
	}
	/**
	 * @return the lowestPrice
	 */
	public int getLowestPrice() {
		return lowestPrice;
	}
	/**
	 * @return the totalTradingValue
	 */
	public int getTotalTradingValue() {
		return totalTradingValue;
	}
	/**
	 * @return the pct_change
	 */
	public double getPct_change() {
		return pct_change;
	}
	
	/**
	 * @param tradingDate the tradingDate to set
	 */
	public void setTradingDate(String tradingDate) {
		this.tradingDate = tradingDate;
	}
	/**
	 * @param symbol the symbol to set
	 */
	public void setSymbol(String symbol) {
		this.symbol = symbol;
	}
	/**
	 * @param centerId the centerId to set
	 */
	public void setCenterId(int centerId) {
		this.centerId = centerId;
	}
	/**
	 * @param priorClosePrice the priorClosePrice to set
	 */
	public void setPriorClosePrice(int priorClosePrice) {
		this.priorClosePrice = priorClosePrice;
	}
	/**
	 * @param ceiling the ceiling to set
	 */
	public void setCeiling(int ceiling) {
		this.ceiling = ceiling;
	}
	/**
	 * @param floor the floor to set
	 */
	public void setFloor(int floor) {
		this.floor = floor;
	}
	/**
	 * @param best1Bid the best1Bid to set
	 */
	public void setBest1Bid(int best1Bid) {
		this.best1Bid = best1Bid;
	}
	/**
	 * @param best2Bid the best2Bid to set
	 */
	public void setBest2Bid(int best2Bid) {
		this.best2Bid = best2Bid;
	}
	/**
	 * @param best3Bid the best3Bid to set
	 */
	public void setBest3Bid(int best3Bid) {
		this.best3Bid = best3Bid;
	}
	/**
	 * @param best1BidVolume the best1BidVolume to set
	 */
	public void setBest1BidVolume(int best1BidVolume) {
		this.best1BidVolume = best1BidVolume;
	}
	/**
	 * @param best2BidVolume the best2BidVolume to set
	 */
	public void setBest2BidVolume(int best2BidVolume) {
		this.best2BidVolume = best2BidVolume;
	}
	/**
	 * @param best3BidVolume the best3BidVolume to set
	 */
	public void setBest3BidVolume(int best3BidVolume) {
		this.best3BidVolume = best3BidVolume;
	}
	/**
	 * @param best1Offer the best1Offer to set
	 */
	public void setBest1Offer(int best1Offer) {
		this.best1Offer = best1Offer;
	}
	/**
	 * @param best2Offer the best2Offer to set
	 */
	public void setBest2Offer(int best2Offer) {
		this.best2Offer = best2Offer;
	}
	/**
	 * @param best3Offer the best3Offer to set
	 */
	public void setBest3Offer(int best3Offer) {
		this.best3Offer = best3Offer;
	}
	/**
	 * @param best1OfferVolume the best1OfferVolume to set
	 */
	public void setBest1OfferVolume(int best1OfferVolume) {
		this.best1OfferVolume = best1OfferVolume;
	}
	/**
	 * @param best2OfferVolume the best2OfferVolume to set
	 */
	public void setBest2OfferVolume(int best2OfferVolume) {
		this.best2OfferVolume = best2OfferVolume;
	}
	/**
	 * @param best3OfferVolume the best3OfferVolume to set
	 */
	public void setBest3OfferVolume(int best3OfferVolume) {
		this.best3OfferVolume = best3OfferVolume;
	}
	/**
	 * @param averagePrice the averagePrice to set
	 */
	public void setAveragePrice(int averagePrice) {
		this.averagePrice = averagePrice;
	}
	/**
	 * @param vol the vol to set
	 */
	public void setVol(int vol) {
		this.vol = vol;
	}
	/**
	 * @param totalVol the totalVol to set
	 */
	public void setTotalVol(int totalVol) {
		this.totalVol = totalVol;
	}
	/**
	 * @param highestPrice the highestPrice to set
	 */
	public void setHighestPrice(int highestPrice) {
		this.highestPrice = highestPrice;
	}
	/**
	 * @param lowestPrice the lowestPrice to set
	 */
	public void setLowestPrice(int lowestPrice) {
		this.lowestPrice = lowestPrice;
	}
	/**
	 * @param totalTradingValue the totalTradingValue to set
	 */
	public void setTotalTradingValue(int totalTradingValue) {
		this.totalTradingValue = totalTradingValue;
	}
	/**
	 * @param pct_change the pct_change to set
	 */
	public void setPct_change(double pct_change) {
		this.pct_change = pct_change;
	}
	
	
}
